<template>
  <div class="my-follow">
<div class="empty" v-if="L===0">
    <van-empty
  :image="imgSrc"
  image-size="80"
  description="你还未关注"
/>
</div>
<div v-else class="content">
  <div  v-for="item in myFollowList" class="content-item">
  <ArticleItem 
        v-if="item.content_type===2"
        :id="item.id"
        :nickname="item.nickname"
        :icon="item.icon"
        :content_type="item.content_type"
        :title="item.title"
        :content="item.content"
        :pic_list="item.pic_list"
        :video_list="item.video_list"
        :tag_list="item.tag_list"
        :hot_comment="item.hot_comment"
        :comment_num="item.comment_num"
        :praise_num="item.praise_num"
        />
        <DetailItem v-else-if="item.content_type===1||item.content_type===100"
        :id="item.id"
        :nickname="item.nickname"
        :icon="item.icon"
        :content_type="item.content_type"
        :content="item.content"
        :pic_list="item.pic_list"
        :tag_list="item.tag_list"
        :hot_comment="item.hot_comment"
        :comment_num="item.comment_num"
        :praise_num="item.praise_num"
       />
       <QuestionItem  
        v-else-if="item.content_type===6"
        :q_id="item.question.q_id"
        :content_type="item.content_type"
        :question="item.question.question"
        :answer_num="item.question.answer_num"
        :praise_num="item.question.praise_num"
        :tag_list="item.tag_list"
        :answer_list_v2="item.question.answer_list_v2"
       
        />
        <TestItem
        v-else-if="item.content_type===99"
        :id="item.id"
        :nickname="item.nickname"
        :icon="item.icon"
        :content_type="item.content_type"
        :content="item.content"
        :video_list="item.video_list"
        :tag_list="item.tag_list"
        :hot_comment="item.hot_comment"
        :comment_num="item.comment_num"
        :praise_num="item.praise_num"
        />
</div>

</div>



  </div>
</template>

<script setup lang="ts">
import ArticleItem from '../../find/findItem/recommendItem/ArticleItem.vue'
import DetailItem from '../../find/findItem/recommendItem/DetailItem.vue'
import QuestionItem from '../../find/findItem/recommendItem/QuestionItem.vue'
import TestItem from '../../find/findItem/recommendItem/TestItem.vue'


import imgSrc from '@/assets/img/focus.png'
import { findStore } from '../../../stores/findStore/find'
import { storeToRefs } from 'pinia';
import {ref} from 'vue'
const followStore = findStore();
const { myFollowList ,myQuestionList} = storeToRefs(followStore);
const L = ref(0);
L.value = myFollowList.value.length;
</script>

<style scoped lang="scss">
.my-follow {
  /* background-color: #; */
  padding-bottom: 4rem;
  .content {
    background-color: #f6f6f6;
    .content-item {
      margin-bottom: .4rem;
}
  }

}
</style>